//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.meida.module.bus.provider.handler;

import com.meida.common.base.handler.SmsSendHandler;
import com.meida.module.bus.provider.util.ToolsUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Map;

@Component("iPyySmsHandler")
public class IpyySmsHandler implements SmsSendHandler {
    private static final Logger log = LoggerFactory.getLogger(IpyySmsHandler.class);

    public IpyySmsHandler() {
    }

    @Override
    public void send(String mobile, Integer code, String areaCode) {
        log.debug("验证码发送" + code);
        try {
            ToolsUtil.sendMsg(mobile, code + "");
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        } catch (InvalidKeyException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void sendSms(String mobile, String tplCode, Map<String, Object> params) {
    }
}
